import {
    lazy
} from "react";
export const mainRouter = [{
        path: '/index/home',
        element: lazy(() => import('../page/index/Home')),
        title:'首页'
    },
    {
        path: '/index/class',
        element: lazy(() => import('../page/index/Class')),
        title:'分类'
    }, 
    {
        path: '/index/jing',
        element: lazy(() => import('../page/index/Jing')),
        title:'京喜'
    }, 
    {
        path: '/index/shop',
        element: lazy(() => import('../page/index/Shop')),
        title:'购物车'
    }, 
    {
        path: '/index/my',
        element: lazy(() => import('../page/index/My')),
        title:'我的'
    },
]
const routes = [{
        from: '/',
        to: '/index/home'
    },
    {
        path: '/index',
        element: lazy(() => import('../page/Index')),
        children: mainRouter
    },
    {
        path: '/login',
        element: lazy(() => import('../page/Login'))
    },
    {
        path:'/detail',
        element:lazy(()=>import('../page/Detail'))
    },
    {
        path: '*',
        element: lazy(() => import('../page/Eorry'))
    }
]
export default routes